<!DOCTYPE html>
<html lang="zh-CN">
<head>
  <meta charset="UTF-8">
  <title>注册 - 食物食材食品基本信息Web系统</title>
  <link rel="stylesheet" href="css/style.css">
  <script>
    document.addEventListener('DOMContentLoaded', function() {
      var userMenu = document.getElementById('userMenu');
      if (userMenu) userMenu.style.display = 'none';
    });
  </script>
</head>
<body>
  <div class="bg"></div>
  <div class="bg bg2"></div>
  <div class="bg bg3"></div>
  <header>
    <h1>食物食材食品基本信息Web系统</h1>
    <nav>
      <div class="user-menu" id="userMenu">
        <img src="img/avatar.png" alt="头像" class="avatar" id="userAvatar">
        <span class="username" id="usernameDisplay">用户</span>
        <span class="dropdown-arrow">&#9662;</span>
        <div class="dropdown-menu" id="dropdownMenu">
          <a href="#" id="profileLink"><span class="menu-icon">&#8962;</span> 个人空间</a>
          <a href="login.html" id="logout"><span class="menu-icon">&#9906;</span> 退出登录</a>
        </div>
      </div>
    </nav>
  </header>
  <main>
    <div class="login-container">
      <h2>用户注册</h2>
      <form id="registerForm" autocomplete="off">
        <div class="form-group">
          <label for="username">用户名：</label>
          <input type="text" id="username" name="username" required>
        </div>
        <div class="form-group">
          <label for="email">邮箱：</label>
          <input type="email" id="email" name="email" required placeholder="请输入邮箱">
        </div>
        <div class="form-group">
          <label for="password">密码：</label>
          <input type="password" id="password" name="password" required autocomplete="off">
        </div>
        <div class="form-group">
          <label for="confirmPassword">确认密码：</label>
          <input type="password" id="confirmPassword" name="confirmPassword" required autocomplete="off">
        </div>
        <div class="form-group">
          <label for="adminSecret">管理员密文：</label>
          <input type="password" id="adminSecret" name="adminSecret" placeholder="如需注册为管理员请填写" autocomplete="off">
        </div>
        <div class="form-group">
          <button type="submit" class="btn btn-primary">注册</button>
        </div>
        <div class="form-group">
          <p>已有账号？<a href="login.html">立即登录</a></p>
        </div>
      </form>
    </div>
  </main>
  <footer>
    <p>&copy; 2025 食物食材食品基本信息Web系统</p>
  </footer>
  <script src="js/register.js"></script>
  <script src="js/user_menu.js"></script>
</body>
</html> 